package com.xbongbong.pro.dynamic.pojo.dto;

import com.xbongbong.paas.domain.entity.ext.PaasFormDataEntityExt;
import com.xbongbong.pro.listbatch.pojo.dto.ListBatchDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 *还原动态
 *
 *@author weijianxun
 */
@Setter
@Getter
@ToString
public class DynamicRestoreDTO implements Serializable {
    private static final long serialVersionUID = -6746410175810812519L;

    private ListBatchDTO listBatchDTO;

    private List<Long> allowDataIds;

    /**
     * 需要包含formId
     */
    private List<PaasFormDataEntityExt> restorePaasFormDatas;

    public static DynamicRestoreDTO initDynamicRestoreDTO(ListBatchDTO listBatchDTO,List<Long> allowDataIds){
        DynamicRestoreDTO dynamicRestoreDTO = new DynamicRestoreDTO();
        dynamicRestoreDTO.setAllowDataIds(allowDataIds);
        dynamicRestoreDTO.setListBatchDTO(listBatchDTO);
        return dynamicRestoreDTO;
    }

    public static DynamicRestoreDTO initRestoreDynamicRestoreDTO(ListBatchDTO listBatchDTO, List<PaasFormDataEntityExt> restorePaasFormDatas) {
        DynamicRestoreDTO dynamicRestoreDTO = new DynamicRestoreDTO();
        dynamicRestoreDTO.setListBatchDTO(listBatchDTO);
        dynamicRestoreDTO.setRestorePaasFormDatas(restorePaasFormDatas);
        return dynamicRestoreDTO;
    }
}
